﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ColinHan.BlamBlam.Client.Entities
{
    class Break
    {
        public Break(Record record)
        {
            Record = record;
        }

        public Record Record { get; private set; }

        public DateTime? StartTime { get; set; }
        public DateTime? EndTime { get; set; }
        public TimeSpan? Elapsed
        {
            get
            {
                if (EndTime == null || StartTime == null)
                {
                    return null;
                }
                return EndTime - StartTime;
            }
        }
    }
}
